<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        StaticMessage
    </ui:define>

    <ui:define name="description">
        StaticMessage component can be used to display a message without the use of a FacesMessages.
    </ui:define>

    <ui:param name="documentationLink" value="/components/staticmessage"/>
    <ui:param name="widgetLink" value="StaticMessage"/>

    <ui:define name="implementation">
        <p:growl id="growl"/>

        <div class="card">
            <h5>Basic</h5>
            <div class="grid">
                <div class="col-12 md:col-4">
                    <p:staticMessage severity="info" summary="INFO" detail="Message Content" style="width: 100%"/>
                </div>
                <div class="col-12 md:col-4">
                    <p:staticMessage severity="warn" summary="WARN" detail="Message Content" style="width: 100%"/>
                </div>
                <div class="col-12 md:col-4">
                    <p:staticMessage severity="error" summary="ERROR" detail="Message Content" style="width: 100%"/>
                </div>
            </div>

            <h5>Closable</h5>
            <p:staticMessage severity="warn" summary="Warning" style="width: 100%"
                             detail="This is a static message that can be closed by the user."
                             closable="true" rendered="#{not messagesView.closed}">
                <p:ajax event="close" listener="#{messagesView.onClose()}" update="growl"/>
            </p:staticMessage>
        </div>

    </ui:define>

</ui:composition>
